<?
    class Principio_Model_Setting
    {
        private $id;
        private $caption;
        private $value;

        public function __construct($values = null)
        {
            if (is_null($values))
            {
                $this->id = -1;
                $this->caption = "";
                $this->value = "";
            }
            else
            {
                if (is_array($values))
                {
                    $this->id = (isset($values['id']) ? $values['id'] : -1);
                    $this->caption = $values['caption'];
                    $this->value = $values['value'];
                }
                else
                {
                    $this->id = -1;
                    $this->caption = "";
                    $this->value = $values;
                };
            };
        }


        public function getID() { return $this->id; }
        public function getCaption() { return $this->caption; }
        public function getValue() { return $this->value; }


        public function setID($id)
        {
            $id_ = intval($id);
            if ($id_ < 1)
                return false;

            $this->id = $id_;
            return $this;
        }


        public function setCaption($caption)
        {
            $this->caption = $caption;
            return $this;
        }


        public function setValue($value)
        {
            $this->value = $value;
            return $this;
        }
    }
?>